1. Field of the Invention
The present invention relates to Universal Serial Bus (USB) systems. More particularly, the present invention relates to a circuit and method for increasing USB device endpoints.
2. Background Information
A conventional Universal Serial Bus (USB) is a communication channel between a host computer and a number of peripheral devices. The USB replaces a wide range of slow and different buses, such as parallel, serial and keyboard connections, with a single bus type to which all devices can connect. The USB can support almost any type of device that can be connected to a personal computer (PC), such as a printer, scanner, digital music players, digital cameras, mobile phones and the like. A conventional USB transaction involves the transmission of packets (for example, three packets) between a USB host and USB device: a token packet, a data packet, and a status packet. A USB transaction begins when the USB host sends a USB token packet describing the type and direction of the transaction (i.e., whether data is transmitted to the USB device from the USB host or to the USB host from the USB device), a USB device address, and an endpoint number. Each USB device has one or more endpoints designated by respective endpoint numbers. An endpoint is the ultimate source or destination for data of the data transaction.
The USB device that is addressed by the token packet selects itself by decoding the appropriate address fields of the token packet. After the token packet is transmitted, data is then transferred in the data packet either from the USB host to a USB device or from a USB device to the USB host. The direction of data transfer is specified in the token packet. The destination of the transaction then sends the status packet indicating whether data transfer was successful or not. The USB device endpoints indicate the number of USB device applications a USB system can support. The memory in a USB device refers to the number of physical endpoints. Thus, the greater the number of physical endpoint buffers in a memory, the greater the cost of the memory. Therefore, the USB devices becomes more expensive if support for greater numbers of USB device applications is desired, which is a disadvantage of the conventional USB system.
FIG. 1 illustrates a conventional system 100 for implementing USB endpoints. The conventional system 100 comprises a USB host 110 coupled to a plurality of physical endpoint buffers, including EP1 122 to EPM 124, in which the logical endpoint (LEP) data 101 is provided to the physical endpoint (PEP) buffers EP1 122 and the EPM 124. The USB host 110 is further coupled to a LEP-to-PEP mapping circuit 112, in which a LEP address 102 is provided to the LEP-to-PEP mapping circuit 112. The LEP-to-PEP mapping circuit 112 is further coupled to a plurality of LEP buffers 114 and 116, in which the LEP data is stored in a first in first out (FIFO) manner. The LEP buffers 114 and 116 are coupled to a controller circuit 118, in which control information is passed to the controller circuit 118 when multiple LEPs are mapped to a single physical endpoint. The controller circuit 118 is coupled to endpoint service logic 120, in which the controller circuit 118 sends the LEP address on the top of the queue to the endpoint service logic 120. The output from the plurality of the PEP buffers EP1 122 to EPM 124 are further coupled to the endpoint service logic 120. The endpoint service logic 120 is further coupled to a USB processor 130.
A disadvantage of the conventional system 100 is that it comprises an endpoint number field of only 4-bits, and, therefore, can only support a maximum of 16 USB device endpoints. In the conventional system 100, each LEP buffer is used for data flow in one direction only, that is, data flow from USB host to external processor or external processor to USB host. Another disadvantage of the conventional system 100 is that increasing the number of endpoints increases the number of PEP buffers, thereby increasing the physical memory and increasing the cost of manufacture.
It would be desirable to provide an improved USB system to increase the number of USB device endpoints without requiring additional physical memory. It would be also desirable to provide an improved USB system to support greater numbers of USB device applications.